﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="RestList.aspx.cs" Inherits="RestList" %>

<%@ MasterType VirtualPath="~/MasterPage.master" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register src="UserControls/Location.ascx" tagname="Location" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" runat="Server">
    <style type="text/css">
        .RadGrid_Gray
        {
            border: 1px solid #fff;
        }
        .GridPager_Gray td
        {
            padding: 0 4px;
            border-bottom: 1px solid #fff;
            border-top: 1px solid #fff;
            font-size:13px;
            font-weight:bold;
        }
        .GridPager{ font-size:12px;}
    </style>
    
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="uxRestList">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="uxRestList" LoadingPanelID="uxLoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="uxLocation">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="uxRestList" LoadingPanelID="uxLoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="uxLoadingPanel" runat="server" Transparency="30"
        MinDisplayTime="500" BackColor="#E0E0E0">
        <img src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading6.gif") %>'
            alt="Loading..." style="border: 0;" />
    </telerik:RadAjaxLoadingPanel>
       
    <div>
        <uc1:Location ID="uxLocation" runat="server" />
    </div>
    <div>
        <telerik:RadGrid ID="uxRestList" runat="server" AutoGenerateColumns="false" AllowPaging="True"
            PageSize="10" PagerStyle-Mode="NextPrevAndNumeric" PagerStyle-Position="TopAndBottom"
            Skin="Gray" GridLines="None" ShowHeader="false" Width="100%" OnNeedDataSource="uxRestList_NeedDataSource"
            OnPreRender="uxRestList_PreRender">
            <MasterTableView DataKeyNames="RestID">
                <Columns>
                    <telerik:GridTemplateColumn>
                        <ItemTemplate>
                            <table width="100%">
                                <tr>
                                    <td width="15%">
                                        <a href="RestDetail.aspx?RestID=<%#Eval("RestID")%>">
                                            <img src="Images/Restaurants/<%#Eval("ImageFolderName")%>/main.gif" alt="No Image"
                                                width="100px" height="100px" border="0" onmouseover="return escape('<image src=\'Images/Restaurants/<%#Eval("ImageFolderName")%>/main.gif\' width=100%/>')" />
                                        </a>
                                    </td>
                                    <td>
                                        <table>
                                            <tr>
                                                <td>
                                                    <b>Tên Quán:</b><font color="red">
                                                        <%#Eval("RestName")%></font><br />
                                                    <b>Kiểu Quán:</b>
                                                    <%#Eval("RestCat")%><br />
                                                </td>
                                                <td>
                                                    <b>Địa Chỉ:</b>
                                                    <%#Eval("Address")%><br />
                                                    <b>Địa Thoại:</b>
                                                    <%#Eval("PhoneNumber")%>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2">
                                                    <b>Giới Thiệu:</b><%#Eval("ShortDescription")%>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2">
                                                    <a class="Link" href="RestDetail.aspx?RestID=<%#Eval("RestID")%>">Chi Tiết... </a>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </div>
</asp:Content>
